<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" media="screen" href="../../css/bootstrap.min.css">
</head>
<body>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
	<form class="form-horizontal" onsubmit="return false" id="form">
		<fieldset>
			<div class='form-group'>
				<label class='col-md-2 control-label'>productId</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='productId' type='text' name='productId' id='productId' data-bv-notempty='true' data-bv-notempty-message='productId 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>specificationsId</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='specificationsId' type='text' name='specificationsId' id='specificationsId' data-bv-notempty='true' data-bv-notempty-message='specificationsId 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>mailId</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='mailId' type='text' name='mailId' id='mailId' data-bv-notempty='true' data-bv-notempty-message='mailId 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>actualPrice</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='actualPrice' type='text' name='actualPrice' id='actualPrice' data-bv-notempty='true' data-bv-notempty-message='actualPrice 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>purchasePrice</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='purchasePrice' type='text' name='purchasePrice' id='purchasePrice' data-bv-notempty='true' data-bv-notempty-message='purchasePrice 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>limitNumber</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='limitNumber' type='text' name='limitNumber' id='limitNumber' data-bv-notempty='true' data-bv-notempty-message='limitNumber 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>increaseDiscount</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='increaseDiscount' type='text' name='increaseDiscount' id='increaseDiscount' data-bv-notempty='true' data-bv-notempty-message='increaseDiscount 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>ispeopleBuy</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='ispeopleBuy' type='text' name='ispeopleBuy' id='ispeopleBuy' data-bv-notempty='true' data-bv-notempty-message='ispeopleBuy 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>spellDiscount</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='spellDiscount' type='text' name='spellDiscount' id='spellDiscount' data-bv-notempty='true' data-bv-notempty-message='spellDiscount 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>spellTime</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='spellTime' type='text' name='spellTime' id='spellTime' data-bv-notempty='true' data-bv-notempty-message='spellTime 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>returnWing</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='returnWing' type='text' name='returnWing' id='returnWing' data-bv-notempty='true' data-bv-notempty-message='returnWing 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>whether</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='whether' type='text' name='whether' id='whether' data-bv-notempty='true' data-bv-notempty-message='whether 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>sales</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='sales' type='text' name='sales' id='sales' data-bv-notempty='true' data-bv-notempty-message='sales 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>mallType</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='mallType' type='text' name='mallType' id='mallType' data-bv-notempty='true' data-bv-notempty-message='mallType 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>universalCoupon</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='universalCoupon' type='text' name='universalCoupon' id='universalCoupon' data-bv-notempty='true' data-bv-notempty-message='universalCoupon 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>itemupshelfTotal</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='itemupshelfTotal' type='text' name='itemupshelfTotal' id='itemupshelfTotal' data-bv-notempty='true' data-bv-notempty-message='itemupshelfTotal 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>totalInventory</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='totalInventory' type='text' name='totalInventory' id='totalInventory' data-bv-notempty='true' data-bv-notempty-message='totalInventory 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>virtualInventory</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='virtualInventory' type='text' name='virtualInventory' id='virtualInventory' data-bv-notempty='true' data-bv-notempty-message='virtualInventory 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>joiningAmount</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='joiningAmount' type='text' name='joiningAmount' id='joiningAmount' data-bv-notempty='true' data-bv-notempty-message='joiningAmount 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>groupLimite</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='groupLimite' type='text' name='groupLimite' id='groupLimite' data-bv-notempty='true' data-bv-notempty-message='groupLimite 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>lotteryTime</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='lotteryTime' type='text' name='lotteryTime' id='lotteryTime' data-bv-notempty='true' data-bv-notempty-message='lotteryTime 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>creater</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='creater' type='text' name='creater' id='creater' data-bv-notempty='true' data-bv-notempty-message='creater 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>updater</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='updater' type='text' name='updater' id='updater' data-bv-notempty='true' data-bv-notempty-message='updater 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>spellNote</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='spellNote' type='text' name='spellNote' id='spellNote' data-bv-notempty='true' data-bv-notempty-message='spellNote 不能为空'>
				</div>
			</div>
			<div class='form-group'>
				<label class='col-md-2 control-label'>spellRemark</label>
				<div class='col-md-10'>
					<input class='form-control' placeholder='spellRemark' type='text' name='spellRemark' id='spellRemark' data-bv-notempty='true' data-bv-notempty-message='spellRemark 不能为空'>
				</div>
			</div>


			<div class="form-actions">
				<div class="row" align="center">
					<div class="col-md-12">
					    <button class="btn btn-primary" onclick="location.href='tswGroupGoodList.html'">返回</button>
						<button class="btn btn-primary" type="submit" onclick="add()">
							<i class="fa fa-save"></i> 保存
						</button>
					</div>
				</div>
			</div>

		</fieldset>
	</form>
</div>
	<script type="text/javascript" src="../../js/libs/jquery-2.1.1.min.js"></script>
	<script type="text/javascript" src="../../js/jq.js"></script>
	<script type="text/javascript" src="../../js/plugin/bootstrapvalidator/bootstrapValidator.min.js"></script>
	<script type="text/javascript" src="../../js/common.js"></script>
	<script type="text/javascript" src="../../layui/layui.js"></script>
	<script type="text/javascript">
		layui.use(['layer','laydate'], function(){
		    var layer = layui.layer;
		});
		
		function add() {
			$('#form').bootstrapValidator();
			var bootstrapValidator = $("#form").data('bootstrapValidator');
			bootstrapValidator.validate();
		    if(!bootstrapValidator.isValid()){
			   return;
		    }
		    
		    var formdata = $("#form").serializeObject();

			$.ajax({
				type : 'post',
				url : '/tswGroupGoods',
				contentType: "application/json; charset=utf-8",  
				data : JSON.stringify(formdata),
				success : function(data) {
					layer.msg("添加成功", {shift: -1, time: 1000}, function(){
                        location.href = "tswGroupGoodList.html";
                    });
				}
			});
		}
		
	</script>
</body>
</html>
